<?
	/* Behind */
	FunctionsHelper::saveCurrentPageInSession($PageName);

	FunctionsHelper::includeFiles(
		array(
			PUBLIC_CONTROLLERS_DIRECTORY . 'news.php'
		)
	);
	
	$NewsC = new NewsC();
	$News = $NewsC->getOne(
		array(
			"id" => $_REQUEST["id"]
		)
	);
		
	$NewsImages = $News->getImage();
	$NewsVideos = $News->getVideo();
	$NewsTags = $News->getTags();
	$NewsAudios = $News->getAudio();
	$NewsComments = $News->getComments();

	$HasImages = 0;
	foreach($NewsImages as $Image){
		if (empty($Image["tag"])){
			$HasImages = 1;
			break;
		}	
	}
	
	$TotalPages = count($News->getComments()) != 0 ? ceil($News->getTotalComments() / count($News->getComments())) : 0;
?>